<template>
	<view class="">
		<Calendar :mode="1" :startDate="today" :endDate="today_next" :themeColor="'#13b1eb'" :switchMonth="true" :initMonthCount="1" @callback="getDate" />
			<view class="Determine" @click="sure" >
				确定
			</view> 
		</Calendar>
		
		<!-- today -->
		<!-- today_next -->
		 <!-- <view class=""> -->
			<!-- <Calendar style="height: 100%;" :mode="1" :startDate="today" :endDate="today_next" :themeColor="'#13b1eb'" :preDisabled="preDisabled" :initMonthCount="3" :switchMonth="true" @callback="getDate" />
				 
			</Calendar> -->
			
		<!-- </view> -->
	</view>
</template>

<script>
	import Calendar from "@/components/mobile-calendar-simple/Calendar.vue";
	export default{
		data(){
			return{
				preDisabled:true,
				start_time:'',
				end_time:'',
				date_obj:{},
				today:' ',
				today_next:' ',
			}
		},
		components:{
			Calendar
		},
		created() {
			var curDate = new Date();
			var nextDate = new Date(curDate.getTime() + 24*60*60*1000);
			var current = curDate.getFullYear() + '-' + (curDate.getMonth() + 1) + '-' + curDate.getDate();
			var behind = nextDate.getFullYear() + '-' + (nextDate.getMonth() + 1) + '-' + nextDate.getDate();
			this.today = current;
			this.today_next = behind;
			console.log(behind)
		},
		methods:{
			//获取回调的日期数据
			getDate(date){
				uni.setStorageSync("select_date", date);
			},
			sure(){
				uni.navigateBack({
					delta: 1
				})
                
			}
		},
		onLoad() {
			 //后一天
			
		}
		
	}
	
</script>

<style>
	.Determine{
		height: 100upx;
		line-height: 100upx;
		width: 100%;
		position: fixed;
		bottom: 0upx;
		left: 0upx;
		background: #f60;
		text-align: center;
		color: #fff;
		z-index: 100;
	}
</style>
